var gulp = require("gulp");
var uglify = require("gulp-uglify");
var concat = require("gulp-concat");
var ts = require("gulp-typescript");
var tsProject = ts.createProject("tsconfig.json");

gulp.task("build", function () {
	return tsProject.src()
		.pipe(tsProject()).js
		.pipe(gulp.dest("dist"));
});

gulp.task("release",["build"], function () {
	return gulp.src(["libs/**/*.js","dist/**/*.js"])
		.pipe(uglify())
		.pipe(concat("all.js"))
		.pipe(gulp.dest("bin"));
});
